<ui:composition template="/WEB-INF/templates/main-template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" >
	
	<ui:param name="pageName" value="#{msg['employeeeform.pagename']}" />
	
	<ui:define name="sidebar">
		<ui:include src="/WEB-INF/templates/public-sidebar.xhtml"/>
	</ui:define>
	<ui:define name="content">		
		
	<h:form id="RRF"> 
	    <p:growl/>
		 <h:outputText value="Recruitment Request Form" styleClass="outputTextTitle"/>		
		
		<h:panelGrid >
		
          <p:panel header="Employee Details"> 
            
             <h:panelGrid style="width:95%;" cellspacing="8" columns="8" columnClasses="gridCellMiddleLeftAligned,employeeDetailLabel,gridCellMiddleLeftAligned, employeeDetailText, gridCellMiddleLeftAligned,employeeDetailLabel,gridCellMiddleLeftAligned, employeeDetailText">            
	          
	           <h:outputLabel value=""/>
	           <h:outputLabel value="RRF Code " /> 
	           <h:outputLabel value=" : " />
	           <h:outputLabel value="#{createRRFBean.rrfCode}"/>           
	           <h:outputLabel value="" />
	           <h:outputLabel value="#{msg['createdate.label']}" />
	           <h:outputLabel value=" : " />
	           <h:outputText  value="#{createRRFBean.createDate}"  >
	           		<f:convertDateTime pattern="dd-MM-yyyy HH:mm a"/>
	           </h:outputText>
            
               <h:outputLabel value="" />
               <h:outputLabel value="#{msg['employeename.label']}" />
               <h:outputLabel value=" : " />
               <h:outputLabel value="#{createRRFBean.employee.firstName} #{createRRFBean.employee.lastName} "  />
               <h:outputLabel value="" />
               <h:outputLabel value="Employee Code" />
               <h:outputLabel value=" : " />
               <h:outputLabel value="#{createRRFBean.employeeId}" /> 
           
           	   <h:outputLabel value="" />
	           <h:outputLabel value="Center Head Name" />
	           <h:outputLabel value=" : " />
	           <h:outputLabel value="#{createRRFBean.dispalyCenterHead}" />    
	         </h:panelGrid>
	      </p:panel>
	       
	      <p:panel header="Recruitment Details">
             <h:panelGrid columns="8"  columnClasses="gridCellMiddleLeftAligned,employeeDetailLabel,gridCellMiddleLeftAligned, employeeDetailText, gridCellMiddleLeftAligned,employeeDetailLabel,gridCellMiddleLeftAligned, employeeDetailText">  
          
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['band.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedBandId}" style="width:150px;">
	           		<f:selectItem itemLabel="--Choose One--" itemValue="" />
					<f:selectItems value="#{createRRFBean.bandsMap}" />
	           </p:selectOneMenu> 
	           <h:outputLabel value="*" style="color : red;"/>          
	           <h:outputLabel value="#{msg['businessfunction.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedBusinessFunction}" style="width:150px;">
	           		<f:selectItem itemLabel="--Choose One--" itemValue="" />
					<f:selectItems value="#{createRRFBean.businessFunctionMap}" />
	           </p:selectOneMenu>
	           
	           <h:inputHidden  />
	           <h:outputLabel value="#{msg['supportfunction.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedSupportFunction}" style="width:150px;">
	           		<f:selectItem itemLabel="--Choose One--" itemValue="" />
					<f:selectItems value="#{createRRFBean.supportFunctionMap}" />
	           </p:selectOneMenu>
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['client.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedClient}" style="width:150px;"> 
					<f:selectItems value="#{createRRFBean.clientMap}" />
	           </p:selectOneMenu>
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['recruiter.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedRecruiterId}" style="width:150px;">
					<f:selectItems value="#{createRRFBean.recruitersMap}" />
	           </p:selectOneMenu> 
	           <h:outputLabel value="*" style="color : red;"/> 
	           <h:outputLabel value="#{msg['interviewlevel.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedInterviewLevel}" style="width:150px;"> 
					<f:selectItems value="#{createRRFBean.interviewLevelMap}" />
					<p:ajax update="@this"></p:ajax>
					<p:ajax event="change" listener="#{createRRFBean.changeInterviewerListener}" update="interviewer1 interviewer2" /> 
	           </p:selectOneMenu>
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="No. of Positions" />
	           <h:outputLabel value=" : " />
	           <p:inputText  value="#{createRRFBean.recruitmentRequest.noofPositions}" style="width:145px;" maxlength="2"/>
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['technology.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedTechnology}" style="width:150px;">
					<f:selectItems value="#{createRRFBean.technologiesMap}" />
					<p:ajax event="change" listener="#{createRRFBean.changeInterviewerListener}" update="interviewer1 interviewer2 primarySkillList" /> <!-- update="interviewer1 interviewer2"  -->
	           </p:selectOneMenu>  
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['interviewerone.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedInterviewerOne}" style="width:150px;" id="interviewer1">  
					<f:selectItems value="#{createRRFBean.interviewersMap}" />  
	           </p:selectOneMenu>
	           <h:inputHidden  />
	           <h:outputLabel value="#{msg['interviewertwo.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedInterviewerTwo}" style="width:150px;" id="interviewer2">  
					<f:selectItems value="#{createRRFBean.interviewers2Map}" />   
	           </p:selectOneMenu>
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['relaventexperience.lable']}" />
	           <h:outputLabel value=" : " />
	           <h:panelGrid columns="3">
	             <p:inputText id="RelaventExperienceFrom" value="#{createRRFBean.recruitmentRequest.relaventExperienceFrom}" style="width:58px;" maxlength="2"/> 
	             <h:outputLabel value="To"  /> 
	             <p:inputText id="RelaventExperienceTo" value="#{createRRFBean.recruitmentRequest.relaventExperienceTo}" style="width:58px;" maxlength="2"/>
	           </h:panelGrid>
	           
		       <h:inputHidden />
	           <h:outputLabel value="#{msg['domainexperience.lable']}" />
	           <h:outputLabel value=" : " />
	           <h:panelGrid columns="3">
		           <p:inputText id="DomainExperienceFrom" value="#{createRRFBean.recruitmentRequest.domainExperienceFrom}" style="width:58px;" maxlength="2"/> 
				   <h:outputLabel value="To"  /> 
				   <p:inputText id="DomainExperienceTo" value="#{createRRFBean.recruitmentRequest.domainExperienceTo}" style="width:58px;" maxlength="2"/>
	           </h:panelGrid>
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="Hire Mode" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedRecruitmentMode}" style="width:150px;"> 
					<f:selectItems value="#{createRRFBean.recruitmentModelMap}" />
	           </p:selectOneMenu>
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['recruitmentpriority.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:selectOneMenu value="#{createRRFBean.selectedRecruitmentPriority}" style="width:150px;"> 
					<f:selectItems value="#{createRRFBean.recruitmentPriorityMap}" />
	           </p:selectOneMenu>	           
	           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="CTC(Per Annum)" />
	           <h:outputLabel value=" : " />
	           <h:panelGrid columns="3">
		           <p:inputText id="SalaryFrom" value="#{createRRFBean.recruitmentRequest.salaryRangeFrom}" style="width:58px;" maxlength="7"/> 
		           <h:outputLabel value="To"  /> 
		           <p:inputText id="SalaryTo" value="#{createRRFBean.recruitmentRequest.salaryRangeTo}" style="width:58px;" maxlength="7"/>
	           </h:panelGrid>
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['location.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:inputText value="#{createRRFBean.recruitmentRequest.jobLocation}" style="width:145px;"/>
           
	           <h:outputLabel value="*" style="color : red;"/>
	           <h:outputLabel value="#{msg['recruitmentenddate.lable']}" />
	           <h:outputLabel value=" : " />
	           <p:calendar  value="#{createRRFBean.recruitmentRequest.recritmentEndDate}" style="width:145px;" pattern="dd-MMM-yyyy"/>              
	           
            </h:panelGrid>
         </p:panel>
           
         <p:panel header="Skill Set"> 
            <h:panelGrid  > 
            
            	 <h:panelGroup>
	            	 <h:outputLabel value="*" style="color : red;"/>
	                 <h:outputLabel value="Job Description" styleClass="outputTextSubTitle" />
	             </h:panelGroup>
	             <p:inputTextarea style="width:715px;" rows="5" value="#{createRRFBean.recruitmentRequest.jobDescription}" autoResize="false"/>   
           
	            <h:panelGroup>
	            	 <h:outputLabel value="*" style="color : red;"/>
	           		 <h:outputLabel value="Primary Skills" styleClass="outputTextSubTitle"/>
	            </h:panelGroup>
	            
	            <p:pickList id="primarySkillList" value="#{createRRFBean.primarySkills}"  var="primarySkill" 
	                itemLabel="#{primarySkill}"  
	                itemValue="#{primarySkill}"  onTransfer="true"  styleClass="ui-picklist-list" />
	                
	             <h:panelGroup>
	             	<p:inputText value="#{createRRFBean.additionalSkill}" style="width:290px;"/>
	             	<p:commandButton value="Add" actionListener="#{createRRFBean.addExtraSkill}" update="@form"/>
	             </h:panelGroup>
	               
	             <h:outputLabel value="Secondary Skills" styleClass="outputTextSubTitle" />
	             <p:inputTextarea style="width:715px;" rows="3" value="#{createRRFBean.recruitmentRequest.secondarySkills}" autoResize="false"/> 
	             
	            
	            
            </h:panelGrid>
            
            <!-- <p:inputText value="#{createRRFBean.enterNumber}" >
            </p:inputText> -->
            
            <h:panelGrid style="padding-top: 5px; width: 100%; border-top: 1px solid #d9d9d9"
						columnClasses="gridCellMiddleRightAligned">
				<h:panelGroup >
				    <p:commandButton value="Save Now"  actionListener="#{createRRFBean.saveRRFRequest}" update="@form" />
					<p:commandButton value="Submit" actionListener="#{createRRFBean.submitRRFRequest}" update="@form" />
		           <p:commandButton value="Reset" action="createrrf" /> 
		           <p:commandButton value="Home" action="wudashboard" />  
				</h:panelGroup>
		    </h:panelGrid> 
         </p:panel>
          
        
        
	 </h:panelGrid>     
     </h:form>
	</ui:define>
	
</ui:composition>
